package com.ssy.lingxi.order.repository;

import com.ssy.lingxi.order.entity.DeliveryNoticeOrderDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

/**
 *  送货通知单Jpa仓库
 * @author czh
 * @date 2022/2/21
 * @version 2.0.0
 */
@Repository
public interface DeliveryNoticeOrderRepository extends JpaRepository<DeliveryNoticeOrderDO, Long>, JpaSpecificationExecutor<DeliveryNoticeOrderDO> {

    DeliveryNoticeOrderDO findFirstByNoticeNo(String noticeNo);

    Integer countByNoticeNoAndDeliveryTimeAndStatusNot(String noticeNo, LocalDateTime deliveryTime,Integer status);


}
